Auto merge of #3490 - alexcrichton:dev-dep-doc-test, r=brson
authorbors <bors@rust-lang.org>
Thu, 12 Jan 2017 04:03:27 +0000 (04:03 +0000)
committerbors <bors@rust-lang.org>
Thu, 12 Jan 2017 04:03:27 +0000 (04:03 +0000)
commit5eb9072cc3b2149e250ea99aaa2c64f0c0486797
tree85f8754c3438a55f4c7056d8a5f6aaa721e7046e
parent4b351eadce9330fa2d17219b48bbcdc8cef255e7
parentfb1736ef2b427a1ea2cd69c12b401a540ae7dbd1
Auto merge of #3490 - alexcrichton:dev-dep-doc-test, r=brson

Fix cargo test --doc with dev-deps

Previously Cargo accidentally didn't pull in dev-dependencies due to the way
`cargo test --doc` was interpreted in terms of top-level targets. This PR
special cases this situation by ensuring that the doctest intention makes its
way all to the backend and the dependencies can be correctly calculated.

Closes #3422
src/cargo/core/workspace.rs
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_rustc/context.rs
src/cargo/ops/cargo_rustc/mod.rs
tests/test.rs